<%-- 
    Document   : userReport
    Created on : 01 Apr 12, 20:33:43
    Author     : DELL
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%
   bean.DataBaseConnection conn = new bean.DataBaseConnection();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <link href='' rel='SHORTCUT ICON'/>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>CUSTOMER PAGE | ROUTER RENT CAR</title>
        <style>
            #main{
                font-weight: bold;
                padding-left:0px;
                padding-right:0px;
                margin-top: 30px;
                margin-left:150px;
                margin-right:75px;
                margin-bottom:0px;
            }

            #menuhor{
                list-style-type: disc;
                margin: 0;
                padding: 0;
                
                float: left;
            }
            #menuhor li {
                margin: 0;
                padding: 0 ;
                float: left;
              
            }
            #menuhor a {
                float: none;
                width: 150px;
                text-align: center;
                color: #FFF;
                text-decoration: none;
                padding: 2px;
                line-height: 2;
                margin-bottom: 3px;
            }
            #menuhor a:hover{
                background: brown;
            }

        </style>
    </head>
    <body background="images/space.jpg">

        <div id="main">
            <img alt="cover" src="images/cod.gif" width="1050" height="400">
           
            <br>
            </body>
             <div id="menuhor"style="position:absolute;right:7px;left:173px;top:370px;">
                 <a href="home.html"><m style="color:whitesmoke;font-family:Tahoma;font-size:27px">  HOME </a></m>
                 <a href="garasimobil.jsp"><m style="color:whitesmoke;font-family:Tahoma;font-size:27px">| GARASI MOBIL </a></m>
                 <a href="form.jsp"><m style="color:whitesmoke;font-family:Tahoma;font-size:27px">| SEWA MOBIL</a></m> 
                 <a href="kembali.jsp"><m style="color:whitesmoke;font-family:Tahoma;font-size:27px">|KEMBALI MOBIL</a></m>
                 <a href="tentangkami.jsp"><m style="color:whitesmoke;font-family:Tahoma;font-size:27px">| KONTAK KAMI</a></m>
             </div><br> <br><br><br>
    
    <body>
        <jsp:useBean id="kalk" scope="session" class="bean.DataBaseConnection"/>
        <jsp:setProperty name="kalk" property="nama" value="${param.nama}"/>
        <jsp:setProperty name="kalk" property="ttl" value="${param.ttl}"/>
        <jsp:setProperty name="kalk" property="alamat" value="${param.alamat}"/>
        <jsp:setProperty name="kalk" property="notlp" value="${param.notlp}"/>
        <jsp:setProperty name="kalk" property="noktp" value="${param.noktp}"/>
        <jsp:setProperty name="kalk" property="nosim" value="${param.nosim}"/>
        <jsp:setProperty name="kalk" property="tglsewa" value="${param.tglsewa}"/>
        <jsp:setProperty name="kalk" property="lamasewa" value="${param.lamasewa}"/> 
        <jsp:setProperty name="kalk" property="mobil" value="${param.mobil}"/>
    <center>
     <%
    try{
            java.sql.Statement statement = conn.getConnection().createStatement();
            java.sql.ResultSet result =null;
        if(kalk.getNama()!=null){
           // String query="insert into customer values ('" + kalk.getNama() + "', '" + kalk.getTtl() + "' , '" + kalk.getAlamat() + "' , '" + kalk.getNotlp() + "' , '" + kalk.getNoktp() + "' , '" + kalk.getNosim() + "' , '" + kalk.getTglsewa() + "' , '" + kalk.getLamasewa() + "' , '" + kalk.getMobil() + "')";
            //result =  statement.executeQuery(query);
        }
        String query2="select * from customer";
            java.sql.ResultSet result2 = statement.executeQuery(query2);
    %>
    <table width="800" border="1">
        <tr>
            <th align="center"><font color="white">Nama</font></th>
            <th align="center"><font color="white">TTL</font></th>
            <th align="center"><font color="white">Alamat</font></th>
            <th align="center"><font color="white">No Tlp</font></th>
            <th align="center"><font color="white">No Ktp</th>
            <th align="center"><font color="white">No Sim</font></th>
            <th align="center"><font color="white">Tgl Sewa</font></th>
            <th align="center"><font color="white">Lama Sewa</font></th>
            <th align="center"><font color="white">Mobil</font></th>
        </tr>
    <%
            while (result2.next()){
    %>
        <tr>
        <td align="center"><font color="white"><% out.println(result2.getString("nama")); %></font></td>
        <td align="center"><font color="white"><% out.println(result2.getString("ttl")); %></font></td>
        <td align="center"><font color="white"><% out.println(result2.getString("alamat")); %></font></td>
        <td align="center"><font color="white"><% out.println(result2.getString("notlp")); %></font></td>
        <td align="center"><font color="white"><% out.println(result2.getString("noktp")); %></font></td>
        <td align="center"><font color="white"><% out.println(result2.getString("nosim")); %></font></td>
        <td align="center"><font color="white"><% out.println(result2.getString("tglsewa")); %></font></td>
        <td align="center"><font color="white"><% out.println(result2.getString("lamasewa")); %></font></td>
        <td align="center"><font color="white"><% out.println(result2.getString("mobil")); %></font></td>
        </tr>
      <%
            }
            statement.close();
        } catch(Exception ex){
            out.println("message: "+ex.getMessage());
        }
      %>
    </table>
     <font face="Verdana" size="4" font color="white">
	cetak Bukti penyewaan untuk mengambil mobil anda...</font>
	<font face="Verdana" size="6" color="#FF0000"></font><br>
	<font face="Verdana" size="2" font color="white">untuk mencetak bukti penyewaan</font>
        <a href="javascript:window.print()">Klik di sini </a>
        </center>
    </body>
</html>

